﻿using System;
using System.Data.Common;

namespace Jayden.Dll.Core.Persistence.Data
{
	public class DbCommandProxy : IDisposable
	{
		private DbConnectionProxy m_ConnectionProxy;
		private DbCommand m_Command;

		public DbCommandProxy(DbConnectionProxy proxy, DbCommand command)
		{
			m_Command = command;
			m_ConnectionProxy = proxy;
		}

		public void Dispose()
		{
			m_Command.Dispose();
			m_Command = null;
		}

		public DbCommand Command { get { return m_Command; } }
	}
}
